//echart_1 人口性别比例
function echart_1() {
    var dom = document.getElementById("chart_1");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    app.title = '人口性别比例';
    var data = [2535780]
    var titlename = ['太原市民政局'];
    var valdata = [683098]
    var myColor = ['#fff'];
    option = {
        xAxis: {
            show: false
        },
        yAxis: [{
            show: false,
            data: valdata,
        }, {
            show: false,
            data: titlename,

        }],
        grid:{
                      x:0,
                      y:0,
                      x2:-80,
                      y2:0,
                      borderWidth:20
               },
        series: [ {
            name: '框',
            type: 'bar',
            yAxisIndex: 1,
            barGap: '-100%',
            data: [25357812],
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#203352',
                    borderWidth: 5,
                    barBorderRadius: 0,
                }
            }
        },{
            name: '条',
            type: 'bar',
            yAxisIndex: 0,
            data: data,
            barWidth: 20,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: '#72ff63'
                }
            },
            
        }, ]
    };
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_1();


function echart_2() {
    var dom = document.getElementById("chart_2");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var data = [2535780]
    var titlename = [];
    var valdata = [683]
    var myColor = ['#1089E7'];
    option = {
        xAxis: {
            show: false
        },
        yAxis: [{
            show: false,
            data: valdata,
        }, {
            show: false,
            data: titlename,

        }],
        grid:{
                      x:0,
                      y:0,
                      x2:-80,
                      y2:0,
                      borderWidth:20
               },
        series: [ {
            name: '框',
            type: 'bar',
            yAxisIndex: 1,
            barGap: '-100%',
            data: [25357812],
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#203352',
                    borderWidth: 20,
                    barBorderRadius: 0,
                }
            }
        },{
            name: '条',
            type: 'bar',
            yAxisIndex: 0,
            data: data,
            barWidth: 20,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: '#00ffb5'
                }
            },
            
        }, ]
    };
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_2();

function echart_3() {
    var dom = document.getElementById("chart_3");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var data = [2535780]
    var titlename = [];
    var valdata = [683]
    var myColor = ['#1089E7'];
    option = {
        xAxis: {
            show: false
        },
        yAxis: [{
            show: false,
            data: valdata,
        }, {
            show: false,
            data: titlename,

        }],
        grid:{
                      x:0,
                      y:0,
                      x2:-80,
                      y2:0,
                      borderWidth:20
               },
        series: [ {
            name: '框',
            type: 'bar',
            yAxisIndex: 1,
            barGap: '-100%',
            data: [25357812],
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#203352',
                    borderWidth: 20,
                    barBorderRadius: 0,
                }
            }
        },{
            name: '条',
            type: 'bar',
            yAxisIndex: 0,
            data: data,
            barWidth: 20,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: '#fed61c'
                }
            },
            
        }, ]
    };
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_3();

function echart_4() {
    var dom = document.getElementById("chart_4");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var data = [2535780]
    var titlename = [];
    var valdata = [683]
    var myColor = ['#1089E7'];
    option = {
        xAxis: {
            show: false
        },
        yAxis: [{
            show: false,
            data: valdata,
        }, {
            show: false,
            data: titlename,

        }],
        grid:{
                      x:0,
                      y:0,
                      x2:-80,
                      y2:0,
                      borderWidth:20
               },
        series: [ {
            name: '框',
            type: 'bar',
            yAxisIndex: 1,
            barGap: '-100%',
            data: [25357812],
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#203352',
                    borderWidth: 20,
                    barBorderRadius: 0,
                }
            }
        },{
            name: '条',
            type: 'bar',
            yAxisIndex: 0,
            data: data,
            barWidth: 20,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: '#036abc'
                }
            },
            
        }, ]
    };
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_4();

function echart_5() {
    var dom = document.getElementById("chart_5");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var data = [2535780]
    var titlename = [];
    var valdata = [683]
    var myColor = ['#1089E7'];
    option = {
        xAxis: {
            show: false
        },
        yAxis: [{
            show: false,
            data: valdata,
        }, {
            show: false,
            data: titlename,

        }],
        grid:{
                      x:0,
                      y:0,
                      x2:-80,
                      y2:0,
                      borderWidth:20
               },
        series: [ {
            name: '框',
            type: 'bar',
            yAxisIndex: 1,
            barGap: '-100%',
            data: [25357812],
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#203352',
                    borderWidth: 20,
                    barBorderRadius: 0,
                }
            }
        },{
            name: '条',
            type: 'bar',
            yAxisIndex: 0,
            data: data,
            barWidth: 20,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: '#ff4f45'
                }
            },
            
        }, ]
    };
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_5();

function echart_6() {
var dom = document.getElementById("chart_6");
var myChart = echarts.init(dom);
option = {
    backgroundColor: "",
    tooltip: {
        },
        grid: {
            top: '4%',
            left: '1%',
            right: '5%',
            bottom: '5%',
            containLabel: true,
        },
        xAxis: [{
            type: 'category',
            boundaryGap: false,
            axisLine: { //坐标轴轴线相关设置。数学上的x轴
                 show: true,
                 lineStyle: {
                     color: '#233e64'
                 },
             },
             axisLabel: { //坐标轴刻度标签的相关设置
                 textStyle: {
                     color: '#6a9cd5',
                     margin:15,
                 },
             },
             axisTick: { show: false,},
            data: ['2014', '2015', '2016', '2017', '2018', '2019'],
        }],
        yAxis: [{
            type: 'value',
            min: 0,
            max:100,
            splitNumber: 6,
            splitLine: {
                 show: true,
                 lineStyle: {
                     color: '#233e64'
                 }
             },
             axisLine: {show: false,},
             axisLabel: {
                margin:20,
                 textStyle: {
                     color: '#6a9cd5',
                     
                 },
             },
             axisTick: { show: false,},  
        }],
        series: [{
            name: '异常流量',
            type: 'line',
            smooth: true, //是否平滑曲线显示
//          symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
            symbolSize:0,
            
            lineStyle: {
                normal: {
                    color: "#3deaff"   // 线条颜色
                }
            },
            areaStyle: { //区域填充样式
                normal: {
                 //线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
                   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                       { offset: 0,  color: 'rgba(61,234,255, 0.7)'}, 
                       { offset: 0.7,  color: 'rgba(61,234,255, 0.1)'}
                   ], false),

                 shadowColor: 'rgba(53,142,215, 0.9)', //阴影颜色
                 shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
             }
         },
            data: [80, 72, 69, 63, 53, 39]
        }]
};
if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
}
echart_6();

